package com.hdax.dmw.item.controller;

import com.hdax.dmw.entity.item.Item;
import com.hdax.dmw.item.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(path = "/item")
public class ItemController {

    @Autowired
    private ItemService itemService;

    @PostMapping(path = "/detail")
    public Item detail(@RequestParam("itemId")Long itemId){
        return itemService.getById(itemId);
    }
}
